from rest_framework.serializers import ModelSerializer
from user.models import ApprovalType, ApprovalProcess, ApprovalProcessUser, Approval, LeaveApproval, LoanApproval, \
    ApprovalUser


# 审批类型
class ApprovalTypeSer(ModelSerializer):
    class Meta:
        model = ApprovalType
        fields = '__all__'


# 审批流程类型
class ApprovalProcessSer(ModelSerializer):
    class Meta:
        model = ApprovalProcess
        fields = '__all__'


# 审批人流程表
class ApprovalProcessUserSer(ModelSerializer):
    class Meta:
        model = ApprovalProcessUser
        fields = '__all__'


# 审批表
class ApprovalSer(ModelSerializer):
    class Meta:
        model = Approval
        fields = '__all__'


# 审批表请假
class LeaveApprovalSer(ModelSerializer):
    class Meta:
        model = LeaveApproval
        fields = '__all__'


# 借款你申请表
class LoanApprovalSer(ModelSerializer):
    class Meta:
        model = LoanApproval
        fields = '__all__'


# 审批人
class ApprovalUserSer(ModelSerializer):
    class Meta:
        model = ApprovalUser
        field = '__all__'


